package com.zh.zhbootcommon.entity.user;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 用户角色关系信息表
 * </p>
 *
 * @author JueDream
 * @since 2021-10-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("zh_user_role_relation")
@ApiModel(value="ZhUserRoleRelation对象", description="用户角色关系信息表")
public class UserRoleRelation implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID")
    @TableId(value = "id", type = IdType.AUTO)
    public Integer Id;

    @ApiModelProperty(value = "用户编号")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty(value = "角色编号")
    @TableField("role_id")
    private Integer roleId;

    @Builder
    public UserRoleRelation(Integer id, Integer userId, Integer roleId) {
        this.Id = id;
        this.userId = userId;
        this.roleId = roleId;
    }
}
